home *** CD-ROM | disk | FTP | other *** search
- on mouseUp
- global EXCF, K5, CASH, F_JOBS, PNM, TWNS, J, CHN, CURR_S, ACTION, YY, MM, DD, F_TRAV, ASKCAST
- set a to integer(Infla(J, CASH / EXCF))
- set b to integer(Infla(J, K5 / EXCF))
- set S to a - b
- set R to getAt(CURR_S, getLast(TWNS))
- set CASH to CASH - K5
- set P to b / 50
- puppetSound("Cash1")
- updateStage()
- set T to the ticks + 60
- repeat while T > the ticks
- set a to a - P
- set the text of field "Money" to string(a) && R
- end repeat
- set the text of field "Money" to string(S) && R
- puppetSound(0)
- set P to value(line 2 of the text of cast ASKCAST)
- append(TWNS, P)
- append(ACTION, PutDate(YY, MM, DD))
- append(ACTION, "D" & P)
- if listp(F_JOBS) then
- set F_JOBS to 0
- end if
- if listp(F_TRAV) then
- set F_TRAV to 0
- end if
- set SArr to MapHierc(getAt(TWNS, count(TWNS) - 1))
- set GArr to MapHierc(getAt(TWNS, count(TWNS)))
- setAt(SArr, 50, 0)
- setAt(GArr, 50, 0)
- set HIT to 0
- repeat with n = 1 to 18
- repeat with m = 1 to 18
- if getAt(GArr, m) = getAt(SArr, n) then
- set HIT to getAt(SArr, n)
- exit repeat
- end if
- end repeat
- if HIT > 0 then
- exit repeat
- end if
- end repeat
- when timeOut then nothing
- NewDate(J)
- set TT to the ticks + 30
- set PPNM to FixPath(J, PNM & "MAP_DIR:MAP" & string(HIT))
- preLoadCast("FLYBY.AIF")
- repeat while TT > the ticks
- end repeat
- puppetSound("FLYBY.AIF")
- updateStage()
- go("MAP")
- go(the frame + 1)
- sound stop CHN
- go(1, PPNM)
- end
-